package BlockQueue;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Li_DaChiZi
 * Date: 2025/6/23
 * Time: 11:11
 */
public class Demo1 {
    public static void main(String[] args) throws InterruptedException {
        BlockingQueue<String> queue = new ArrayBlockingQueue<>(3);
        queue.put("111");
        System.out.println("put success！");
        queue.put("111");
        System.out.println("put success！");
        queue.put("111");
        System.out.println("put success！");

        System.out.println(queue.take());

    }
}
